/**
 * Created with JetBrains PhpStorm.
 * User: dsphinx
 * Date: 12/1/13
 * Time: 10:19 AM
 * To change this template use File | Settings | File Templates.
 */

$(document).ready(function () {


    /**
     *
     * example call
     * $.postJSON('App/Api/Auth.php', { user: name, pass: name2, _call_service:  'ss' }, function (data, status, xhr) {
                    ...
        });
     *
     */
    (function ($) {
        $.postJSON = function (url, obj, callback) {
            $.ajax({
                url: url,
                type: 'POST',
                dataType: 'json',
                data: JSON.stringify(obj),
                contentType: 'application/json; charset=utf-8',
                success: callback
            });
        };
    }(jQuery));




});